home *** CD-ROM | disk | FTP | other *** search
/ Young Minds / Young Minds Interactive CD-ROM.ISO / mpss / installr.ms < prev    next >
Encoding:
Text File  |  1988-07-20  |  3.7 KB  |  77 lines

  1. .TH
  2. How to install or alter MPSS.
  3. .SH
  4. SETIING UP THE FILES
  5. .LP
  6. If mpss lives in one directory, a subdirectory called "mpsslib" must
  7. be created. "mpsslib" must have permissions 0777 (rwx for all!). Before
  8. compiling the program make sure that all file names in the file "files.h"
  9. have been altered accordingly. Make sure that this file contains the
  10. FULL pathnames of any files accessed.
  11. inside mpsslib we put 3 files, with permissions as follows and owner
  12. of all three being daemon. (ALL THIS MUST BE FOR THE GAME TO WORK!!)
  13. All files in mpsslib must have permission 4755 or 4777 as shown below.
  14. (i.e. they set uid as soon as they are invoked.)
  15.  
  16. "mpsslib" should look like this :
  17. .DS L
  18.  
  19. total 144
  20. -rwsrwxrwx  1 daemon         59 May 11 15:06 mpssmail (file exec. on a new game)
  21. -rwsr-xr-x  1 daemon      44032 May 12 11:07 slave (invoked by ../mpss)
  22. -rwsr-xr-x  1 daemon      98304 May 12 11:11 startrek (the master game&process!)
  23.  
  24. the directory above mpsslib should look like this :
  25.  
  26. -rwsr-xr-x 1 daemon      mpssclean (to clean up a mess if there is one)
  27. -rwxr-xr-x 1 anyone      mpss (proggie to invoke the full game)
  28. -rwxr-xr-x 1 anyone      mpssrules (nroff -ms format)
  29. drwxrwxrwx 1 anyone      mpsslib (subdirectory for all files.)
  30.  
  31. .DE
  32. .SH
  33. How to change mpss.
  34. .LP
  35. To add another type of terminal.
  36. .LP
  37. All the terminal control strings are defined in cursor.c . So, if you wish
  38. to add another terminal, put in another case for it in all 3 relevant
  39. procedures in that file. Then edit slave.c and allow the variable tty_type
  40. to get that value. (look in procedure gettermdata() ).
  41. Make sure not to mess about with case 0, which is to exit the proggie in case
  42. of doubt. After that invoke mpss not using the -t option and choose the terminal
  43. you have implemented.
  44. .SH
  45. Structure of the game..
  46. .LP
  47. First note that the entire game is controlled by one main master process.
  48. Heres a sample run of what goes on. (The file main.c contains the main game iteration loop.)
  49. .LP
  50. A guy invokes mpss. This tiny proggie only sets the players umask to 000 and
  51. opens the /dev/ttyxx file of the player and makes it rw access for all, so
  52. the master proggie can write/read from that terminal. Mpss then execls 
  53. /mpsslib/slave which is owned by daemon so it can send signals to the
  54. master-star-trek proggie that is also owned by daemon.  Now, slave starts running. If the mpsslib/masterpid (MASTERPIDFILE) isnt there, this means that the
  55. master process isnt running yet. Slave makes a LOCK file and if the master
  56. isnt there, invokes it. If it is there (i.e. masterpid is present) it 
  57. carries on. After waiting until the masterpidfile appears, slave makes
  58. a PLAYERFILE, mpss/player, reads the master process id out of masterpid,
  59. and signals the masterprocess that a playerfile is there. The master process
  60. gets the signal, reads the playerfile enters the player into the list of players and starts to play him. The master removes the playerfile then, and 
  61. then slave removes the LOCK file. No other slave will make a player file
  62. if the lock file is present. The playerfile contains the shipnumber,cursor motion and clear screen strings, as well as the players terminal name. After
  63. a player starts playing, if he dies, a playerscorefile is made, and the
  64. waiting slave process is signalled. It reads the playerscorefile, then the
  65. score file (which contains the scoreboard) adds him in, writes back the
  66. scoreboard and removes the playerscorefile.r
  67. Other files in the game are "shipnumber" wich only contains a number between
  68. 0-28 keeping track of which ship is to be allocated next. omakefile makes
  69. everything with the -O option, gmakefile makes everything with the -g option.
  70.  
  71. LIVE LONG & PROSPER
  72. Any problems? ask Peer Schmitz, Department of Computer Science
  73. University of Keele, Keele, Staffs, ST5-5BG
  74.  
  75.  
  76.  
  77.